package com.xltx.sms.service;

import org.springframework.lang.NonNull;

/**
 * @Author liuyc
 * @ClassName AliyunSmsService
 * @Description
 * @Date 2021/12/16 14:27
 */
public interface AliyunSmsService {

    /**
     * Alibaba cloud sends SMS
     *
     * @param phoneNumber  receive mobile phone number
     * @param signName     SMS signature
     * @param templateCode SMS template
     * @param message      SMS content
     * @return String
     */
    String sendSms(@NonNull String phoneNumber, @NonNull String signName,
                   @NonNull String templateCode, @NonNull String message);

    /**
     * Get random number of verification code
     *
     * @param digits Number of verification codes
     * @return String
     */
    String getRandCode(int digits);
}
